package com.example.demo.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.fasterxml.jackson.annotation.JsonInclude;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import org.springframework.format.annotation.DateTimeFormat;

import java.io.Serializable;
import java.time.LocalDateTime;

/**
 * 订单表(UserOrder)实体类
 *
 * @author 杨丽辉
 * @since 2021-03-19 18:10:57
 */
@ApiModel("订单表")
@JsonInclude(JsonInclude.Include.NON_NULL)
public class UserOrder implements Serializable {
    private static final long serialVersionUID = 413405070318081471L;
        /**
    *主键
    * 订单表id
    * isnull 1
    */
    @ApiModelProperty(value="订单表id", position=1)
    @TableId(type = IdType.ASSIGN_ID)
    private String orderId;

    /**
    * 用户id
    * isnull 0
    */        @ApiModelProperty(value="用户id",position=2)
    private String userId;
    /**
    * 订单描述
    * isnull 0
    */        @ApiModelProperty(value="订单描述",position=3)
    private String orderExplain;
    /**
    * 消耗积分
    * isnull 0
    */        @ApiModelProperty(value="消耗积分",position=4)
    private Integer consumptionPoints;
    /**
    * 充值金额
    * isnull 0
    */        @ApiModelProperty(value="充值金额",position=5)
    private Integer money;
    /**
    * 购买商品数量
    * isnull 0
    */        @ApiModelProperty(value="购买商品数量",position=6)
    private Integer commodityCount;
    /**
    * 是否支付（0：支付成功；1：待支付；2：支付失败）
    * isnull 0
    */        @ApiModelProperty(value="是否支付（0：支付成功；1：待支付；2：支付失败）",position=7)
    private Integer status;
    /**
    * 订单类型（0：章节购买；1：打赏：2：平台赠送）
    * isnull 0
    */        @ApiModelProperty(value="订单类型（0：章节购买；1：打赏：2：平台赠送）",position=8)
    private Integer orderType;
    /**
    * 订单生成时间
    * isnull 0
    */        @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
        @ApiModelProperty(value="订单生成时间",position=9)
    private LocalDateTime createTime;
    /**
    * 目标类型id
    * isnull 0
    */        @ApiModelProperty(value="目标类型id",position=10)
    private String targetId;
    /**
    * 涉及综合参数字典id
    * isnull 0
    */        @ApiModelProperty(value="涉及综合参数字典id",position=11)
    private String compreParametersId;
        
    public String getOrderId() {
        return orderId;
    }

    public void setOrderId(String orderId) {
        this.orderId = orderId;
    }
        
    public String getUserId() {
        return userId;
    }

    public void setUserId(String userId) {
        this.userId = userId;
    }
        
    public String getOrderExplain() {
        return orderExplain;
    }

    public void setOrderExplain(String orderExplain) {
        this.orderExplain = orderExplain;
    }
        
    public Integer getConsumptionPoints() {
        return consumptionPoints;
    }

    public void setConsumptionPoints(Integer consumptionPoints) {
        this.consumptionPoints = consumptionPoints;
    }
        
    public Integer getMoney() {
        return money;
    }

    public void setMoney(Integer money) {
        this.money = money;
    }
        
    public Integer getCommodityCount() {
        return commodityCount;
    }

    public void setCommodityCount(Integer commodityCount) {
        this.commodityCount = commodityCount;
    }
        
    public Integer getStatus() {
        return status;
    }

    public void setStatus(Integer status) {
        this.status = status;
    }
        
    public Integer getOrderType() {
        return orderType;
    }

    public void setOrderType(Integer orderType) {
        this.orderType = orderType;
    }
        
    public LocalDateTime getCreateTime() {
        return createTime;
    }

    public void setCreateTime(LocalDateTime createTime) {
        this.createTime = createTime;
    }
        
    public String getTargetId() {
        return targetId;
    }

    public void setTargetId(String targetId) {
        this.targetId = targetId;
    }
        
    public String getCompreParametersId() {
        return compreParametersId;
    }

    public void setCompreParametersId(String compreParametersId) {
        this.compreParametersId = compreParametersId;
    }

        @Override
    public String toString() {
        return "{" +
                    " \"orderId\":" + orderId +
                                  " ,\"userId\":" + userId +
                            " ,\"orderExplain\":" + orderExplain +
                            " ,\"consumptionPoints\":" + consumptionPoints +
                            " ,\"money\":" + money +
                            " ,\"commodityCount\":" + commodityCount +
                            " ,\"status\":" + status +
                            " ,\"orderType\":" + orderType +
                            " ,\"createTime\":" + createTime +
                            " ,\"targetId\":" + targetId +
                            " ,\"compreParametersId\":" + compreParametersId +
                  '}';
    }


}
